<div class="admin"><include file="Public/simulated_scroll_bar" />
<div class="tab panel dux-box admin-panel">
    <div class="panel-head"><strong>编辑文章</strong></div>
    <form id="goods_class_form" action="" method="post">
        <input type="hidden" name="form_submit" value="ok" />
        <input type="hidden" name="id" value="{$article_id}" />
        <table class="table tb-type2">
            <tbody>
            <tr>
                <td class="required"><label for="parent_id">所属分类:</label></td>
                <td class="vatop rowform">
                    <select name="cat_id" id="gc_parent_id" class="querySelect">
                        <option value="0">顶级分类</option>
                        <volist name="cat" id="v">
                            <option value ="{$v['cat_id']}"<?php if($v['cat_id'] == $ar['cat_id']){echo "selected='selected'";}?>>
                                {$v['cat_name']}
                            </option>
                        </volist>
                    </select>
                </td>
                <td class="vatop tips"></td>
            </tr>
            <tr>
                <td class="required" width="10%"><label class="validation" for="gc_name">文章标题:</label></td>
                <td class="vatop" width="30%"><input type="text"  name="title" id="gc_name" maxlength="20" class="input input_big" value={$ar['title']}></td>
                <td class="vatop tips"></td>
            </tr>
            <tr>
                <td>是否推荐：</td>
                <td>
                    <div class="field">
                        <div class="button-group button-group-small radio">
                            <if condition="$ar['is_put']">
                                <label class="button active"><input name="is_put" checked="checked" value="1" type="radio"><span class="icon icon-check"></span> 是</label>
                                <label class="button "><input name="is_put" value="0" type="radio"><span class="icon icon-times"></span> 否</label>
                            <else />
                                <label class="button"><input name="is_put" value="1" type="radio"><span class="icon icon-check"></span> 是</label>
                                <label class="button active"><input name="is_put" checked="checked" value="0" type="radio"><span class="icon icon-times"></span> 否</label>
                            </if>
                        </div>
                    </div>
                </td>
                <td></td>
            </tr>

            <tr>
                <td class="required"><label class="validation" for="gc_name">文章作者:</label></td>
                <td class="vatop rowform">
                    <input type="text" value="{$ar['author']}" name="author" id="gc_name" maxlength="20" class="input input_big">
                </td>
                <td class="vatop tips"></td>
            </tr>

            <tr>
                <td class="required"><label class="validation" for="gc_name">关键字:</label></td>
                <td class="vatop rowform"><input type="text" value="{$ar['keywords']}" name="keywords" id="gc_name" maxlength="20" class="input input_big"></td>
                <td class="vatop tips"></td>
            </tr>

            <tr>
                <td class="required">网页描述：</td>
                <td class="required"><textarea name="description" style="width:360px;height:100px" class="input input_big">{$ar['description']}</textarea></td>
                <td class="vatop tips"></td>
            </tr>

            
            <tr>
                <td class="required"><label class="validation" for="gc_name">图片地址:</label></td>
                <td class="vatop rowform">
                <!-- 图片上传按钮 -->
                <a class="button input-file bg-blue" href="javascript:void(0);">+ 浏览文件
                <input class="fileupload" type="file" name="image" data-name="file_url" data-num="1" />
                </a>
                <!-- 图片展示模块 -->
                <div class="files">
                    <notempty name="ar['file_url']">
                    <div class="images_zone"><input type="hidden" value="{$ar['file_url']}" name="file_url">
                        <span><img src="{$ar['file_url']}!100x100"></span>
                        <a href="javascript:;" style="display: none;">删除</a>
                    </div>
                    </notempty>
                </div>
                <div style="clear:both;"></div>
                <!-- 图片上传进度条模块 -->
                <div class="up_progress"><div class="progress-bar"></div></div>
                </td>
                <td class="vatop tips"></td>
            </tr>
            
            <tr>
                <td><label class="validation" for="gc_name">文章内容：</label></td>
                <td colspan="2">
                    <script type="text/javascript" charset="utf-8" src="/Public/ueditor1_4_3/ueditor.config.js"></script>
                    <script type="text/javascript" charset="utf-8" src="/Public/ueditor1_4_3/ueditor.all.min.js"></script>
                    <script type="text/javascript" charset="utf-8" src="/Public/ueditor1_4_3/lang/zh-cn/zh-cn.js"></script>
                    <textarea id="editor" type="text/plain" style="width:100%;height:200px;" name="content" >{$ar['content']}</textarea>
                    <script>
                        var ue = UE.getEditor('editor');
                        UE.Editor.prototype._bkGetActionUrl = UE.Editor.prototype.getActionUrl;
                        UE.Editor.prototype.getActionUrl = function(action) {
                            if (action == 'uploadimage' || action == 'uploadscrawl' || action == 'uploadimage') {
                                return '{:ADMIN_URL}/Admin/ueditor';
                            } else {
                                return this._bkGetActionUrl.call(this, action);
                            }
                        }
                    </script>
                </td>
            </tr>
            
            <tr>
                <td class="required"><label class="validation" for="gc_name">外部链接:</label></td>
                <td class="vatop rowform"><input type="text" value="{$ar['link']}" name="link" id="gc_name" maxlength="200" class="input input_big"></td>
                <td class="vatop tips"></td>

            </tr>

            </tbody>
            <tfoot class="panel-foot">
            <tr>
                <td colspan="3"><input class="button bg-main" type="submit" value="提交"></td>
            </tr>
            </tfoot>
        </table>
    </form>
</div>
</div>
<script type="text/javascript" src="__JS__/jquery.uploads.js"></script>
<script>
    $('#goods_class_form').layer({
    });
</script>


